import { request } from "@/utils/request.js"
import largescreeViewMockData from "@/mock/data/largescreen/index.js"


function query(mockDataName) {
    const { integrationData, catalog } = largescreeViewMockData;
    const { data: result } = integrationData[catalog.indexOf(mockDataName)];
    return { data: result }
}

/**
 * 运行监控总数
 * @param {*} options 
 * @returns 
 */
export function getMonitorTotal(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/yyjkzs`,
        method: 'get',
        mockFilter: (req, mockDataName = "yyjkzs") => {
            return query(mockDataName)
        },
        params: options
    })

}



/**
 * 应用监控概览
 * @param {} options 
 * @returns 
 */
export function getMonitoringOverview(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/yyjkgl`,
        method: 'get',
        mockFilter: (req, mockDataName = "yyjkgl") => {

            return query(mockDataName)
        },
        params: options
    })

}


/**
 * 应用监控概览弹框
 * @param {} options 
 * @returns 
 */
export function getMonitoringDetails(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/yxtc`,
        method: 'get',
        mockFilter: (req, mockDataName = "yxtc") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 用户访问情况
 * @param {*} options 
 * @returns 
 */
export function getUserAccess(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/yhfw`,
        method: 'get',
        mockFilter: (req, mockDataName = "yhfw") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 用户访问情况
 * @param {*} options 
 * @returns 
 */
export function userAccessCount(options = {}) {
    return request({
        url: `dgd/auth/session/count/`,
        method: 'get',
        mockFilter: (req, mockDataName = "count") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 运行趋势
 * @param {*} options 
 * @returns 
 */
export function userVisitTrend(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/yxqs`,
        method: 'get',
        mockFilter: (req, mockDataName = "yxqs") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 基础设施选择应用
 * @param {*} options 
 * @returns 
 */
export function baiscAppOptions(options = {}) {
    return request({
        url: `sjzt/sd_model/v1/xzyy`,
        method: 'get',
        mockFilter: (req, mockDataName = "xzyy") => {

            return query(mockDataName)
        },
        params: options
    })
}

/**
 * 基础设施设备数量
 * @param {*} options 
 * @returns 
 */
export function baiscDeviceNum(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/gcsb`,
        method: 'get',
        mockFilter: (req, mockDataName = "gcsb") => {

            return query(mockDataName)
        },
        params: options
    })
}


/**
 * 基础设施信息监控
 * @param {*} options 
 * @returns 
 */
export function baiscInformation(options = {}) {
    return request({
        url: `sjzt/test_json/jcssxx`,
        method: 'get',
        mockFilter: (req, mockDataName = "jcssxx") => {

            return query(mockDataName)
        },
        params: options
    })
}

/**
 * 缺陷总览
 * @param {*} options 
 * @returns 
 */
export function bugTotal(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/qxzl`,
        method: 'get',
        mockFilter: (req, mockDataName = "qxzl") => {
            return query(mockDataName)
        },
        params: options
    })
}

/**
 * 迭代缺陷列表
 * @param {*} options 
 * @returns 
 */
export function bugTableList(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/qxlb`,
        method: 'get',
        mockFilter: (req, mockDataName = "qxlb") => {
            return query(mockDataName)
        },
        params: options
    })
}

/**
 * 业务运维
 * @param {*} options 
 * @returns 
 */
export function getOperationMaintenance(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/ywyw`,
        method: 'get',
        mockFilter: (req, mockDataName = "ywyw") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 业务实时办理日志
 * @param {*} options 
 * @returns 
 */
export function businessActualTimeLog(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/ywlog`,
        method: 'get',
        mockFilter: (req, mockDataName = "ywlog") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 人员情况柱状图
 * @param {*} options 
 * @returns 
 */
export function usersBarChart(options = {}) {
    return request({
        url: `sjzt/sd_model/v1/ryqkzzt`,
        method: 'get',
        mockFilter: (req, mockDataName = "ryqkzzt") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 需求跟踪数据预览
 * @param {*} options 
 * @returns 
 */
export function demandInfoData(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/xqgz`,
        method: 'get',
        mockFilter: (req, mockDataName = "xqgz") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 需求跟踪进展日志
 * @param {*} options 
 * @returns 
 */
export function demandLog(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/xqlog`,
        method: 'get',
        mockFilter: (req, mockDataName = "xqlog") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 需求停留天数
 * @param {*} options 
 * @returns 
 */
export function demandDateTime(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/xqtlts`,
        method: 'get',
        mockFilter: (req, mockDataName = "xqtlts") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 需求跟踪饼图
 * @param {*} options 
 * @returns 
 */
export function getDemandPieTotal(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/xqgz_bt`,
        method: 'get',
        mockFilter: (req, mockDataName = "xqgz_bt") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 需求跟踪柱状图
 * @param {*} options 
 * @returns 
 */
export function getDemandBarTotal(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/xqgz_zzt`,
        method: 'get',
        mockFilter: (req, mockDataName = "xqgz_zzt") => {

            return query(mockDataName)
        },
        params: options
    })

}


/**
 * 需求跟踪横向排名图
 * @param {*} options 
 * @returns 
 */
export function getDemandRankBarTotal(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/yxgz_hx`,
        method: 'get',
        mockFilter: (req, mockDataName = "yxgz_hx") => {

            return query(mockDataName)
        },
        params: options
    })

}

/**
 * 应用运行监控_弹窗
 * @param {*} options 
 * @returns 
 */
export function getMonitoringOverviewDetail(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/yxtc`,
        method: 'get',
        mockFilter: (req, mockDataName = "yxtc") => {

            return query(mockDataName)
        },
        params: options
    })

}


/**
 * 应用监控_列表总览数据
 * @param {*} options 
 * @returns 
 */
export function yyjkTotal(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/yyjk_total`,
        method: 'get',
        mockFilter: (req, mockDataName = "yyjk_total") => {

            return query(mockDataName)
        },
        params: options
    })

}



/**
 * 应用监控_列表总览数据
 * @param {*} options 
 * @returns 
 */
export function cxlbsj(options = {}) {
    return request({
        url: `sjzt/sd_monitor/v1/cxlbsj`,
        method: 'get',
        mockFilter: (req, mockDataName = "cxlbsj") => {

            return query(mockDataName)
        },
        params: options
    })

}









